package com.classroom.smart.result;

import com.mysql.cj.x.protobuf.MysqlxDatatypes;

/**
 * @Description TODO
 * @Author chenmin
 * @Version 1.0
 * @Date 2023/1/12 15:40
 */
public class CommonResult<T> {

    private int code;
    private String msg;
    private T data;

    public CommonResult() {
    }

    public CommonResult(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public CommonResult(int code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    /**
     * 获取
     * @return code
     */
    public int getCode() {
        return code;
    }

    /**
     * 设置
     * @param code
     */
    public void setCode(int code) {
        this.code = code;
    }

    /**
     * 获取
     * @return msg
     */
    public String getMsg() {
        return msg;
    }

    /**
     * 设置
     * @param msg
     */
    public void setMsg(String msg) {
        this.msg = msg;
    }

    /**
     * 获取
     * @return data
     */
    public T getData() {
        return data;
    }

    /**
     * 设置
     * @param data
     */
    public void setData(T data) {
        this.data = data;
    }

    public String toString() {
        return "CommonResult{code = " + code + ", msg = " + msg + ", data = " + data + "}";
    }
}
